#include<iostream>
#include<string>
#include<unordered_map>


int main() {
    std::unordered_map<std::string, std::string> mymap = {
        { "house","maison" },
        { "apple","pomme" },
        { "tree","arbre" },
        { "book","livre" },
        { "door","porte" },
        { "grapefruit","pamplemousse" }
    };

    unsigned n = mymap.bucket_count();

    std::cout << "mymap has : " << n << " buckets.\n";

    for (unsigned i = 0; i < n; i++)
    {
        std::cout << "bucket # : " << i << " contains: ";

        for(auto it = mymap.begin(i); it != mymap.end(i); it++) {
            std::cout << "[" << it->first << " : " << it->second << "] ";
        }

        std::cout << std::endl;
    }
    
    return 0;
}